Brushless motor speed control system

ABSTRACT

This system provides a wide range of smooth and precisely controlled low and high speeds for pan-tilt-zoom surveillance cameras, in which a brushless motor is controlled by a Microcontroller in a low speed mode by sinusoidal synchronous commutation, in a high speed mode by block commutation, and in in a transition phase from the low speed mode to the high speed mode by modulating integrated pulse-width modulation (PWM) square waves with sine waves. PID and lookup table registers are used by a microcontroller for a smooth transition from high speed mode to low speed mode, and from low speed mode to high speed mode, phase locking a sine position during transitions, in order to give a surveillance camera an ability to quickly move from one target to another at up to 100 degrees per second yet track objects that are moving very slowly.

FIELD OF INVENTION

This invention relates to a novel device in the general field of motorcontrol systems, and more specifically to one which permits a widerrange of speeds for brushless motors as used in pan-tilt-zoomsurveillance cameras.

BACKGROUND OF THE INVENTION

Surveillance cameras are commonly directed to move at high speed so theycan identify and track a potential intruder as early as possible.However, it has been found that very slow moving threats are not alwaysdetected by some surveillance cameras because they are not capable ofoperating at very slow tracking speeds, and because slow speed operationpresents unique technological challenges to produce recognizable images.Motorized panning and tilting of surveillance cameras at a wide range ofspeeds require motors that can operate smoothly at both high and lowspeeds. While high speed operation can effectively use brushless motorsin block commutation modes, low speed operation using the same mode candegrade the quality of the image due to the lower frequency of thestepping function. This is especially apparent when a camera is pannedor zoomed to follow a target that has a large down range movement asopposed to a large movement across the horizon. Fine movements of aslow-moving camera that are not smoothed out can cause noticeablestuttering and vibration that create blurring or misinterpretation ofsurveillance images. There is a need for a surveillance camera motioncontrol system that operates smoothly at both high and low speeds, anddoes not require expensive digital encoding methods to enable smooth andprecise motor control timing at low speeds. Some attempts to solve thisproblem have been found in the prior art and will now be described.

One prior art attempt to solve this problem is a controller used for avariable speed fridge compressor (U.S. Pat. No. 7,102,306). While bothhigh speed block commutation and low speed sine commutation are used toprovide a wider speed range, the smoothness of low speed operation isnot sufficient to operate long range surveillance cameras. Another priorart attempt to solve this problem is a controller used for a variablespeed dentist drill (U.S. Pat. No. 6,091,216). Again, both modes areused to provide both speed ranges, but the speed variation at slow speedranges is not sufficient to prevent blurred images for long rangesurveillance camera control applications. In summary, there is still aneed for a Brushless Motor Speed Control System which provides asufficiently smooth operation for consistently clear long rangesurveillance imaging when used at low speeds, but is also capable ofhigh speed camera movement when needed, and which combines theseelements efficiently, at low cost, and with fewer extraneous components.

BRIEF SUMMARY OF THE INVENTION

The Brushless Motor Speed Control System is designed to provide smoothand precisely controlled low and high speed motor driving, of a verywide speed range, employing the same controller. The issue withbrushless motors employing hall sensors for high speed block commutationtiming is that the hall sensors do not provide enough resolution todrive the motor consistently at low speeds. One solution is to run themotor synchronously at speeds below approximately 200 rpm. If this isdone using the same block commutation timing, the resulting rotation isvery notchy as the motor jumps from one magnet position to the next. Byimplementing a sinusoidal synchronous commutation at low speeds, thisnotchiness is removed.

The disclosed speed control system was designed because the camerasurveillance industry is switching from older style brush motors tobrushless motors. Most new surveillance cameras use BRUSHLESS motors topan, tilt, and zoom (PTZ) and these motors operate by the blockcommutation method using pulse-width modulation (PWM) motor controlcircuitry. At high speeds, this method operates smoothly, but at lowspeeds, they cannot create an image without noticeable blurring causedby the lowered positional discrimination in this mode. Smooth low speedoperation of brushless motors is possible by operating as a steppermotor with sinusoidal synchronous commutation, but the seamlessintegration of these two complimentary commutation modes is notavailable using presently available methods and technologies.

A key aspect of this invention is the control of brushless motor speedsusing the functional integration of two commonly employed commutationmethods. Smooth low speed control is achieved without the need forexpensive digital encoders, by synchronously driving three PWMs, sinewave modulated. Smooth high speed control employs trapezoidal HallEffect feedback looping with programmable controller PID (Proportional,Integrated, Differential) error correction. Long range surveillancecameras require PTZ motors able to operate at any speed without imageblurring due to unneeded motions caused by limitations of commutationmodes or transition between modes. Therefore a means to ensure smoothtransition between low and high speed commutation mode is also necessaryand is incorporated in this control system.

With the introduction of advanced programmable controllers employinggreater peripheral functionality and including integrated PWM drivers,much smoother operation of dual mode brushless motor controllers is nowpossible. New software capabilities with greater sampling rates not onlypermit smoother operation in both commutation modes, but also smoothertransition between modes. In this design, no expensive digital encodersare required at low speeds, yet fine motor resolution is possible,enabling clear images even at rotation rates of one per month or less.At the same time, a high speed mode, with nominal speeds of up to 100degrees per second, is available without the speed limitations andoverheating of the stepper motor mode. The resulting control systemrequires fewer complex and expensive parts, a simpler implementation,and provides an exceptionally wide speed range suitable for long rangesurveillance imaging of consistent clarity.

The invention thus is essentially a brushless motor control system forproviding a wide range of smooth and precisely controlled low and highspeeds for pan-tilt-zoom surveillance cameras, in which a brushlessmotor is controlled by a programmable controller:

-   -   a) in a low speed mode by sinusoidal synchronous commutation;    -   b) in a high speed mode by block commutation;    -   c) in a transition phase from the low speed mode to the high        speed mode by modulating integrated pulse-width modulation (PWM)        square waves with sine waves.

The system achieves smooth low speed control without the need fordigital encoders, by the programmable controller synchronously drivingmultiple PWMs, sine wave modulated, in the low speed mode.

Examples of the “programmable controller” would be i) a microcontroller,running software fed to it, ii) a field programmable gate array (FPGA),configured to control the motor's circuits, or iii) an applicationspecific integrated circuit (ASIC), dedicated to controlling the motor'scircuits.

In one preferred embodiment:

-   -   a) appropriate high speed control is achieved by a motor driver        card that receives Hall sensor outputs from the brushless motor        and provides appropriate PWM output to drive the brushless motor        at a selected speed;    -   b) the high speed mode employs trapezoidal Hall Effect feedback        looping with programmable controller Proportional, Integrated,        Differential (PID) error correction;    -   c) a camera control card issues Video System Control        Architecture formatted commands on a TTL serial bus to a Pan        motor driver card or to a Tilt motor driver cards or to a        camera;    -   d) motor driver cards can command a motor to go to a specific        position, report the current position by means of a digital        resolver, drive at a specific speed and direction, and stop;    -   e) motor driver cards can command a motor to send back data,        such as current motor speed and PWM levels and can set motor        operational parameters;    -   f) the operation parameters include one or more of closed loop        gains, acceleration rates, and brake force;    -   g) an auxiliary control card can allow for three independent        integrated circuit bus protocol ports so that pan, tilt and zoom        positions can be fed to it from each position, thereby enabling        external dedicated secure control pathways for panning, tilting        and zooming;    -   h) a motor driver card used to regulate the speed of        pan/tilt/zoom (PTZ) motors as directed from an external source        such as a camera control card or an auxiliary control card;    -   i) the brushless motor comprises a series of stationary        wire-wound stators affixed around a central rotating multipolar        magnet rotor that generates rotary motion to move a surveillance        camera around each axis when provided with an appropriately        timed PWM output through the stators;    -   j) Hall Sensors are positioned around the brushless motor to        detect polarity changes as it rotates, and to provide speed        regulation feedback signals to a programmable controller by        means of a sensor output pathway;    -   k) the programmable controller generates control signals for a        PWM driver chip which supplies PWM output for the brushless        motor;    -   l) a resolver driver chip detects and processes motor positions        for each axis and forwards angular positional data to a        programmable controller chip;    -   m) a sinusoidal waveform oscillator generates sine waves for        smooth motor speed in low speed in the low speed mode;    -   n) in the low speed mode a sine wave is sent to each stator in        the brushless motor, and each succeeding stator receives a sine        input which is a number of degrees advanced from that sent to a        previous stator;    -   o) in the high speed mode, the brushless motor is driven by each        channel of a PWM output, which is regulated by a feedback loop        from a Hall sensor output;    -   p) in the transition phase from the low speed mode to the high        speed mode, the modulation of the PWM square waves with sine        waves is done by:        -   i) having a center locked phase alignment between each            wavelength, and by using a fixed frequency between            wavelengths;        -   ii) each sine wave adds to or subtracts from a standard PWM            output and creates a modulated PWM waveform;    -   q) sine commutation drives the brushless motor by means of sine        wave input to stators, the sine wave being incrementally out of        phase to each successive stator in increments that are 360        degrees divided by the number stators, whereby a rotor is        attracted to each stator 14 in turn as the sine wave input at a        first stator increases to its maximum voltage, and then to a        second stator as its voltage increases while the first stator's        voltage decreases;    -   r) the low speed mode operates when the brushless motor has an        rpm number less than a presselected number in the range of        200-300 rpm, the high speed mode operates when the brushless        mote has an rpm number greater than a preselected number in the        range of 200-300 rpm; and the transition phase occurs at a        transition speed in the range of 200-300 rpm, in order to effect        smooth operation of the brushless motor speeds above and below        the transition speed;    -   s) the high speed mode uses closed loop feedback which sends        Hall sensor outputs to the programmable controller which        determines if a speed of the brushless motor is high enough and        then regulates that speed by means of PID looping;    -   t) a result of PID looping determines a duty cycle of a square        wave sent to a power stage controller which supplies a PWM        driver, the driver sends a phased output to drive each stator of        the brushless motor, the PID looping varies the duty cycle        according to proportional, integrated, and differential speed        error, commutation is controlled by switching through a        commutation pattern every time Hall sensors change polarity, and        three PWMs run a common duty cycle, but only one PWM output is        enabled at a time;    -   u) the low speed mode varies a PWM duty cycle according to        preset values held in a sine wave lookup table, position in the        lookup table is sequential and is switched by a timer interrupt        to control speed of the brushless motor, each stator thereof        having its own PWM output source, each source being a set number        of degrees apart in the sine table, the PWM duty cycle being        continuously varied in a sine wave pattern, and torque being a        fixed factor applied to the sine wave lookup table values before        loading into a PWM duty cycle control register;    -   v) the low speed mode uses synchronous drive consisting of three        PWMs, sine wave modulated;    -   w) the transition phase uses H-Bridge PWM drivers, a fixed PWM        output frequency, and a phase alignment that is center locked;    -   x) if a speed regulation of the brushless motor is due, a new        speed is calculated by taking a proportional and integral error        between a required speed and a measured speed, from which a new        value for a PWM duty cycle is then calculated, and a regulation        loop is interrupt driven to ensure that it occurs regularly;

The brushless motor control system thus provides a wide range of smoothand precisely controlled speeds for pan-tilt-zoom surveillance cameras,using a seamless combination of high and low speed commutation modes fora brushless motor. The system preloads PID and lookup table registersused by a programmable controller for a smooth transition from highspeed mode to low speed mode, and from low speed mode to high speedmode, phase locking a sine position during transitions, in order to givea surveillance camera an ability to quickly move from one target toanother at up to 100 degrees per second yet track objects that aremoving very slowly.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a general diagram of all relevant electronic and mechanicalelements of the Brushless Motor Speed Control System.

FIG. 2 shows a Motor Driver Card and how it connects to a motor.

FIG. 3 shows a Flow Chart illustrating the transition between modes,some of the software functions of its programmable controller chip, andhow it controls the motor.

FIG. 4 shows the waveforms of the transition between modes.

FIG. 5 shows a schematic of the Motor Driver Card.

FIG. 6 shows a schematic of the Camera Control Card.

FIG. 7 shows a schematic of the TTL Serial Bus.

FIG. 8 shows a flowchart of basic motor operations.

FIG. 9 shows PWM output waveforms in high speed mode.

DETAILED DESCRIPTION

All elements will first be introduced by reference to figures, then thefunctionality and interactions of each element with each other elementwill be described, and finally the preferred embodiment of the noveldevice will be described in detail.

FIG. 1 diagrams the entire Brushless Motor Speed Control System 10wherein each motor driver card 22 receives Hall sensor outputs 20 fromthe motor 12, and depending on the operating mode and the requiredspeed, provides the appropriate PWM output 28 to drive the motor 12. Acamera control card 40 can issue VISCA (Video System ControlArchitecture) formatted commands on a TTL serial bus 30 to either Pan orTilt motor driver cards 22, or to the camera 38. Motor driver cards 22can command each motor 12 to go to a specific position, report thecurrent position by means of a digital resolver 32, drive at a specificspeed and direction and stop (see FIG. 8). There will also be commandsto read back data such as current speed and PWM levels and commands toset motors operational parameters such as closed loop gains,acceleration rates, brake force etc. An auxiliary control card 42 canallow for three independent IC bus protocol ports so that pan, tilt andzoom positions can be fed to it from each source, thereby enablingexternal dedicated secure control pathways.

FIG. 2 details the motor driver card 22 used to regulate the speed ofPTZ motors 12 as directed from external sources such as the cameracontrol card 40 or the auxiliary control card 42, by means of the TTLSerial Bus 30. Each motor 12 includes a series of stationary wire-woundstators 14 affixed around its inner circumference. A central rotatingmultipolar magnet called a rotor 16 generates the rotary motion requiredto move the camera 38 around each axis when provided with anappropriately timed PWM output 28 through the stators 14. Hall Sensors18 are positioned around the motor 12 to detect polarity changes as itrotates, and provide a speed regulation feedback signals to theprogrammable controller 24 by means of the sensor output 20 pathway. Theprogrammable controller 24 generates the control signals for the PWMdriver chip 26 which supplies the PWM output 28 for the motor 12. Thedriver card 22 has its own resolver driver 34 chip which detects andprocesses motor 12 positions for each axis by means of the digitalresolver 32, and forwards the angular positional data to theprogrammable controller chip 24. Finally, a sinusoidal waveformoscillator 36 generates the sine waves 44 necessary for smoother LowSpeed Mode 48, which will be illustrated in FIGS. 3 & 4, and explainedin more detail below.

FIG. 3 flowcharts the basic functional elements necessary to generateeither low speed mode 48 or high speed mode 50, and demonstrates asmooth transition between the two modes. With the exception of externalinputs such as those from the TTL bus 30, sine oscillator 36, or Hallsensor outputs 20, as well as the power stage controller (PSC) 56, PWMdriver 26, and the motor 12, the remaining elements on this flowchartillustrate programmable operations within the onboard programmablecontroller 24. In order to properly understand this flowchart, theseoperational terms need more complete definitions; therefore a detailedexplanation of its elements will be postponed until the fullerdescription in the preferred embodiment below.

FIG. 4 illustrates by means of wave diagrams, the transition from lowspeed mode 48 to high speed mode 50. In low speed mode 48 a sine wave 44is sent to each stator 14, and each stator 14 receives a sine inputwhich is 120 degrees advanced from that sent to the previous stator 14.In high speed mode 50, the motor 12 is driven by each channel of the pwmoutput 28, which is regulated by a feedback loop from the hall sensoroutputs 20. (see FIG. 3) The smooth transition from low speed mode 48 tohigh speed mode 50 is created by modulating the PWM square waves 46 withsine waves 44 as shown in FIG. 4. This is made possible by having acenter locked phase alignment 62 between each wavelength, and by using afixed frequency 60 (16 kHz, for instance) between wavelengths. FIG. 4shows by means of broken arrows where each sine wave 44 adds to (A1, B1,C1) or subtracts from (A2, B2, C2) the standard PWM output 28 (comparewith FIG. 9), and which creates a modulated PWM waveform which enablesthe transition from low speed mode 48 to high speed mode 50.

FIG. 5 shows a schematic of the motor driver card 22 using an Atmel 90PWM programmable controller 24. FIG. 6 shows a schematic of the cameracontrol card 40, and FIG. 7 a schematic of the TTL serial bus 30circuitry. FIG. 8 flowcharts the non speed related motor controloperations, and FIG. 9 shows the PWM output 28 waveforms in high speedmode 50.

The preferred embodiment of the brushless motor speed control system 10will now be described in detail. In order to properly understand thecore concepts of this invention, especially as illustrated by FIGS. 3 &4, there should be consistent use of terminology relevant to this field.Therefore a brief review of the terms relevant to brushless motors,drive and control methods and speed modes will now be undertaken.

The two methods used to control the running speed of a motor are openloop (synchronous) or closed loop (asynchronous or feedback). Open loop(synchronous) control is the application of direct power to the motorwithout feedback error correction. Varying the power applied to themotor directly varies the motor speed. Closed loop (asynchronous)control is a method in which the power input of a motor is adjusted by acontrol circuit which compares a reference signal with a feedback signalproportional to an output parameter (e.g., speed) of the motor to modifythe power input of the motor so as to achieve or maintain some desiredoperating condition of the motor (e.g., constant running speed). Thespecific method of closed loop motor control employed in this inventionwill be discussed below.

The two methods used to drive (turn) an electric motor 12 are sine(sinusoidal) or block commutation. A commutator in this application is ameans of electronic switching that periodically reverses the current ofthe stators 14 in an electric motor 12 in order to efficiently turn therotor 16.

The sine commutation method drives the motor by means of sine wave 44input to each stator 14. In order to turn the rotor 16, the sine wave 44input at each stator 14 is out of phase by that fraction a circledivided by the number stators 14. If three stators 14 are used, theneach stator 14 is 120 degrees out of phase from the last stator 14. Bythis means the rotor 16 is attracted to each stator 14 in turn as thesine wave 44 at one stator 14 increases to its maximum voltage, and thento the next stator 14 as its voltage increases while the previousstator's 14 voltage decreases. Thus the motor 12 turns by means of thesine wave 44 commutation method.

The block commutation method drives a motor 12 by means of square wave46 input to each stator 14. When driving a motor 12 by this method, ahigher number of stators 14 are usually required in order to preventtorque losses during rotation from one stator 14 to the next, which isdue to the on-off nature of square wave 46 inputs. The disadvantages ofblock commutation are the cost for the rotor position sensor,tachogenerator, and rotary encoder, plus the torque jump duringswitching between the individual phases, which appears as torque ripple.Recent efforts to remedy these problems include powering withsine-valued pulse-width modulation (PWM).

While PWM block commutation commonly drives brushless DC motors 12efficiently at high speeds, the square wave 46 input is incapable ofdriving at low speeds without unwanted jittering because the phasetransitions are not smooth enough.

For purposes of this invention, two speed modes and two transition modesare defined, with the low speed mode 48 approximately 200-300 rpm orless, and high speed mode 50 approximately 200-300 rpm or greater.Transition modes are defined as the direction from which a speed changepasses through the transition speed 70 range (approximately 200-300rpm). Therefore, LH mode 66 is defined as a low to high speedtransition, and HL mode 68 is a high to low speed transition. As will beshown below, because two commutation methods are employed, differentmethods are required to effect a smooth transition depending on whetherone is going from sine to block or block to sine commutation.

A brushless motor speed control system 10 with a wide speed range,including ultra low speeds, requires a means to drive (turn) the motorefficiently, and methods to smoothly control its speed at all requiredranges. As described above, the disclosed speed control system 10 usesblock commutation at high speed mode 48 and sine commutation at lowspeed mode 50. Each of these modes will now be discussed in detail, aswell as the transition speed 70 modes required to effect smoothoperation at all speeds. High Speed Mode:

The motor 12 is driven in high speed mode 50 by means of square wave 46PWM output 28. As shown in FIG. 3, the speed is controlled with theclosed loop feedback method which sends hall sensor outputs 20 to theprogrammable controller 24 which determines if the speed is high enough(above 200-300 rpm), and then regulates that speed by means of PIDlooping. The result determines the duty cycle 58 of the square wave 46sent to the power stage controller 56, which supplies the PWM driver 26,which sends the phased output 28 to drive each stator 14 of the motor12. PID looping varies the duty cycle 58 according to proportional,integrated, and differential speed error. Commutation is controlled byswitching through commutation pattern every time hall sensors 18 changestate (polarity). All three PWMs run the same duty cycle, but only onePWM output is enabled at a time.

Low Speed Mode:

The relationship between the position of the rotor 16 and stator 14, andthe time that the electromagnets change their polarity, is known as“timing”. In high speed mode 50 the speed is calculated from the timingbetween each hall sensor 18 interrupt sent to the programmablecontroller 24. But the hall sensors 18 are not perfectly spaced aroundthe motor 12 so there will be some speed jitter. Averaging the sensoroutput 20 can diminish this effect, while an optical encoder could solvethis problem. Most application notes state that sine wave 44 commutationrequires an optical encoder but this device adds a significant amount tothe price of the motor controller. The disclosed method achieves thesame speed range without the need for an optical encoder, and the hallsensors may be eliminated as well.

Synchronous mode varies the PWM duty cycle 58 according to preset valuesheld in sine wave 44 lookup table 52. Position in the LUT 52 issequential and is switched by timer interrupt 54 which controls speed inthe low speed mode 48. Each stator 14 has its own PWM output 28 source,each source is 120 degrees apart in the sine table, and the PWM dutycycle 58 is continuously varied in a sine wave 44 pattern. Torque is afixed factor applied to the sine wave 44 lookup table 52 values beforeloading into PWM duty cycle 58 control register.

To drive a motor 12 in low speed mode 48 while employing the samefeedback loop of the high speed mode would require a larger number ofHall Effect sensors for it to be able to rotate smoothly at ultra lowspeeds. Instead, as shown in FIG. 3, the motor 12 is drivensynchronously in low speed mode 48, using a timer interrupt 54 toadvance the programmable controller's 24 lookup table (LUT) 52. A timerinterrupt 54 is used when a certain event must happen at a givenfrequency, such as causing the motor 12 to rotate synchronously.Therefore, synchronous timing in low speed mode 48 is enabled by thetimer interrupt 54, which provides the appropriate duty cycle 58 todrive each phase of the PWM output 28 to the motor 12. In order to runat speeds below 200 rpm, the motor 12 can be operated open loop in astepper mode. In this mode the commutation is switched from one step tothe next under timer interrupt 54 and the hall sensors 18 are ignored.In summary, low speed mode 48 uses synchronous drive which consists ofthree PWMs sine wave 44 modulated. The ability to switch into steppermotor mode once the speed drops below 200-300 rpm means that there iseffectively no lower limit to the speed of the motor 12. Transitionmodes:

A key element to the smooth operation of a dual commutation mode speedcontrol system 10 requires that the transition between speed modes besmooth. This functionality is made possible by faster and more versatileprogrammable controllers, software programs, and novel capabilities ofH-Bridge PWM drivers. As shown in FIG. 4, other elements that make asmooth transition possible are the use of a fixed PWM output 28frequency 60, and a phase alignment 62 that is center locked. Asoutlined above, the two transitions possible are LH mode 66 and HL mode68, so we will now discuss the unique means to maintain consistenttransition speeds throughout these ranges. The specifics of thisdiscussion refer to FIGS. 3 and 4 throughout.

LH Mode:

The transition from low speed mode 48 to high speed mode 50 is shown inFIG. 3, at the point where the operating speed falls within thetransition speed 70 range, the programmable controller 24 pre-loadsdefault error values into the PID regulation loop in order to achieve asmooth transition.

As shown in FIG. 4, the PWM output 28 goes from sine wave 44 tomodulated square wave 46 during the transition speed 70 range tounmodulated square wave 46 in high speed mode 50.

HL Mode:

The transition from high speed mode 50 to low speed mode 48 is madepossible by supplying a similar set of preset values (see FIG. 3) to thesine wave lookup table 52 instead of using the timer interrupt 54 tosynchronize motor 12 driving. In this case, the current hall sensor 18position from high speed mode 50 is used to start the sine wave 44pattern at the nearest point in its cycle so that it is synchronized tothe rotation of the motor 12. While in synchronous mode, drive slip canbe detected by monitoring the hall position sensors 20 relative to thesine wave 44. Note that there is also a baseline torque input (see fixedtorque factor in FIG. 3) added to the duty cycle 58 in low speed mode48.

Software Implementation:

Interrupts from the hall sensors 18 trigger routines that take speedmeasurements by reading timer0. These are stored in an array so that arunning average can be taken from the last 24 samples. The position ofthe rotor 16 is also read from the hall sensors 18 and the nextcommutation step is found and sent to the motor drive chip. At the sametime the current duty cycle 58 value is read and loaded in the powerstage controller (PSC) 56 hardware which generates the PWM drive output28 to the motor 12 windings.

Asynchronously, the main software loop runs and reads commands in fromthe TTL serial bus 30 port, which are decoded and processed by theprogrammable controller 24. After that, if a speed regulation is due,the new speed is calculated by taking the proportional and integralerror between the required speed and the measured speed. A new value forthe PWM duty cycle is then calculated. Currently the PWM has 12 bitresolution and the error values are 16 bit signed. The regulation loopcould be changed to be interrupt driven to ensure that it occursregularly. Also the PWM duty cycle 58 is only reloaded 24 times perrevolution i.e. as each hall interrupt occurs. As speed variation cannotbe measured between hall sensors, there is little point in make PWMadjustments more frequent.

As shown in FIGS. 1-3, the resolver 32 is an angular positioning sensorwhich provides axis positional data to the camera control card 40 bymeans of the resolver driver chip 34, and this allows the motor drivercard 22 to turn a camera 38 to a specific position at a specific speed.PTZ position data is also sent to the auxiliary control card 42 on ahigh speed IyC bus from the camera control card 40. The camera controlcard 42 manages the preset position control loop and is solelyresponsible for sending speed commands to the motor driver cards 22.

The dual mode of operation provides a very large range of speed controlgiving the camera the ability to quickly move from one target to anotherat up to 100 degrees per second and track objects moving very slowly.For practical purposes that can be described as one 360 degree rotationper month, although the system could go slower if there was a need. Noproduct on the market currently has anywhere near this range of speed ofoperation or ultra low speed capability.

Minimum slow speed possible approaches zero rpm and is only limited bythe size of the counter timer and the clock rates provided to it.Currently there are 64 steps in the sine wave table and the maximum ratewe clock through is around 300 rpm with a motor using 4 pole pairs. Inthe current programmable controller 24 design, the bottom speed is setto 30 rpm at the motor, but the current design can operate down to 1rpm. Motors with fewer pole pairs will rotate faster.

Top speed is limited by supply voltage and CPU processing speed.Currently we can go beyond the rated specification of the input stage ofthe gearbox, 10,000 rpm and have measured speeds of over 18,000 rpm.Again, motors with fewer pole pairs will rotate faster. In theprogrammable controller 24 design, the standard power supply voltagelimits the top speed of the motor 12, but we aim to get up to 12,750rpm. The current design will go up to nearly 18 k but it needs 30V to doit. Using a Maxon motor there are 24 interrupts per revolution so thatthe CPU is clocking at the maximum speed available.

There are three Hall sensors 18 in all of the motors 12 we have testedand they commutate on the rising and falling edges. The 4 pole pairMaxon motor gets 24 edges per revolution. The limitations are the lookuptable size which gives some granularity to the slowest speeds, but onecan achieve 64 steps when on full zoom. So by storing a quarter of thesine wave, a potential to quadruple the resolution without using up anymore space is possible. The sine mode is limited in its maximum speedbecause it is synchronous and it does not develop maximum torque in themotor, so there is quite a lot of heating in the motor, which means thatit's basically operating at maximum stall current all the time in thismode.

The core uniqueness of the brushless motor speed control system 10 isthe provision of a very wide speed control range with minimal processingpower and cost. This is achieved by means of seamless integration ofcommutation modes, preloading the PID & LUT registers for a smoothtransition, and phase locking the sine position during transitions.

The foregoing description of the preferred apparatus and method ofimplimentation should be considered as illustrative only, and notlimiting. Other embodiments are not ruled out or similar methods leadingto the same result. Other techniques and other materials may be employedtowards similar ends. Various changes and modifications will occur tothose skilled in the art, without departing from the true scope of theinvention as defined in the above disclosure, and the following generalclaims.

I claim:
 1. A brushless motor control system for providing a wide rangeof smooth and precisely controlled low and high speeds for pan-tilt-zoomsurveillance cameras, in which a brushless motor is controlled by aprogrammable controller:: a) in a low speed mode by sinusoidalsynchronous commutation; b) in a high speed mode by block commutation;c) in a transition phase from the low speed mode to the high speed modeby modulating integrated pulse-width modulation (PWM) square waves withsine waves.
 2. The brushless motor control system for providing a widerange of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras of claim 1, in which smooth low speed control isachieved without the need for digital encoders, by the programmablecontroller synchronously driving multiple PWMs, sine wave modulated, inthe low speed mode.
 3. The brushless motor control system for providinga wide range of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras of claim 1, in which appropriate high speed controlis achieved by a motor driver card that receives Hall sensor outputsfrom the brushless motor and provides appropriate PWM output to drivethe brushless motor at a selected speed.
 4. The brushless motor controlsystem for providing a wide range of smooth and precisely controlledspeeds for pan-tilt-zoom surveillance cameras of claim 1, in which thehigh speed mode employs trapezoidal Hall Effect feedback looping withprogrammable controller Proportional, Integrated, Differential (PID)error correction.
 5. The brushless motor control system for providing awide range of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras of claim 1, in which a camera control card issuesVideo System Control Architecture formatted commands on a TTL serial busto a Pan motor driver card or to a Tilt motor driver cards or to acamera.
 6. The brushless motor control system for providing a wide rangeof smooth and precisely controlled speeds for pan-tilt-zoom surveillancecameras of claim 1, in which motor driver cards can command a motor togo to a specific position, report the current position by means of adigital resolver, drive at a specific speed and direction, and stop. 7.The brushless motor control system for providing a wide range of smoothand precisely controlled speeds for pan-tilt-zoom surveillance camerasof claim 1, in which motor driver cards can command a motor to send backdata, such as current motor speed and PWM levels and can set motoroperational parameters.
 8. The brushless motor control system forproviding a wide range of smooth and precisely controlled speeds forpan-tilt-zoom surveillance cameras of claim 7, in which the operationparameters include one or more of closed loop gains, acceleration rates,and brake force.
 9. The brushless motor control system for providing awide range of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras of claim 1, in which an auxiliary control card canallow for three independent integrated circuit bus protocol ports sothat pan, tilt and zoom positions can be fed to it from each position,thereby enabling external dedicated secure control pathways for panning,tilting and zooming.
 10. The brushless motor control system forproviding a wide range of smooth and precisely controlled speeds forpan-tilt-zoom surveillance cameras of claim 1, in which a motor drivercard used to regulate the speed of pan/tilt/zoom (PTZ) motors asdirected from an external source such as a camera control card or anauxiliary control card.
 11. The brushless motor control system forproviding a wide range of smooth and precisely controlled speeds forpan-tilt-zoom surveillance cameras of claim 1, in which the brushlessmotor comprises a series of stationary wire-wound stators affixed arounda central rotating multipolar magnet rotor that generates rotary motionto move a surveillance camera around each axis when provided with anappropriately timed PWM output through the stators.
 12. The brushlessmotor control system for providing a wide range of smooth and preciselycontrolled speeds for pan-tilt-zoom surveillance cameras of claim 1, inwhich Hall Sensors are positioned around the brushless motor to detectpolarity changes as it rotates, and to provide speed regulation feedbacksignals to a programmable controller by means of a sensor outputpathway.
 13. The brushless motor control system for providing a widerange of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras of claim 1, in which the programmable controllergenerates control signals for a PWM driver chip which supplies PWMoutput for the brushless motor.
 14. The brushless motor control systemfor providing a wide range of smooth and precisely controlled speeds forpan-tilt-zoom surveillance cameras of claim 1, in which a resolverdriver chip detects and processes motor positions for each axis andforwards angular positional data to a programmable controller chip. 15.The brushless motor control system for providing a wide range of smoothand precisely controlled speeds for pan-tilt-zoom surveillance camerasof claim 1, in which a sinusoidal waveform oscillator generates sinewaves for smooth motor speed in the low speed mode.
 16. The brushlessmotor control system for providing a wide range of smooth and preciselycontrolled speeds for pan-tilt-zoom surveillance cameras of claim 1, inwhich: a) in the low speed mode a sine wave is sent to each stator inthe brushless motor, and each succeeding stator receives a sine inputwhich is a set number of degrees advanced from that sent to a previousstator; b) in the high speed mode, the brushless motor is driven by eachchannel of a PWM output, which is regulated by a feedback loop from aHall sensor output c) in the transition phase from the low speed mode tothe high speed mode, the modulation of the PWM square waves with sinewaves is done by: i) having a center locked phase alignment between eachwavelength, and by using a fixed frequency between wavelengths; ii) eachsine wave adds to or subtracts from a standard PWM output and creates amodulated PWM waveform.
 17. The brushless motor control system forproviding a wide range of smooth and precisely controlled speeds forpan-tilt-zoom surveillance cameras of claim 1, in which sine commutationdrives the brushless motor by means of sine wave input to stators, thesine wave being incrementally out of phase to each successive stator inincrements that are 360 degrees divided by the number stators, whereby arotor is attracted to each stator 14 in turn as the sine wave input at afirst stator increases to its maximum voltage, and then to a secondstator as its voltage increases while the first stator's voltagedecreases.
 18. The brushless motor control system for providing a widerange of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras of claim 1, in which the low speed mode operateswhen the brushless motor has an rpm number less than a presselectednumber in the range of 200-300 rpm.
 19. The brushless motor controlsystem for providing a wide range of smooth and precisely controlledspeeds for pan-tilt-zoom surveillance cameras of claim 1, in which thehigh speed mode operates when the brushless mote has an rpm numbergreater than a preselected number in the range of 200-300 rpm.
 20. Thebrushless motor control system for providing a wide range of smooth andprecisely controlled speeds for pan-tilt-zoom surveillance cameras ofclaim 1, in which the transition phase occurs at a transition speed inthe range of 200-300 rpm in order to effect smooth operation of thebrushless motor speeds above and below the transition speed.
 21. Thebrushless motor control system for providing a wide range of smooth andprecisely controlled speeds for pan-tilt-zoom surveillance cameras ofclaim 1, in which the high speed mode uses closed loop feedback whichsends Hall sensor outputs to the programmable controller whichdetermines if a speed of the brushless motor is high enough and thenregulates that speed by means of PID looping.
 22. The brushless motorcontrol system for providing a wide range of smooth and preciselycontrolled speeds for pan-tilt-zoom surveillance cameras of claim 21, inwhich a result of PID looping determines a duty cycle of a square wavesent to a power stage controller which supplies a PWM driver, the driversends a phased output to drive each stator of the brushless motor, thePID looping varies the duty cycle according to proportional, integrated,and differential speed error, commutation is controlled by switchingthrough a commutation pattern every time Hall sensors change polarity,and three PWMs run a common duty cycle, but only one PWM output isenabled at a time.
 23. The brushless motor control system for providinga wide range of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras of claim 1, in which the low speed mode varies aPWM duty cycle according to preset values held in a sine wave lookuptable, position in the lookup table is sequential and is switched by atimer interrupt to control speed of the brushless motor, each statorthereof having its own PWM output source, each source being a set numberof degrees apart in the sine table, the PWM duty cycle beingcontinuously varied in a sine wave pattern, and torque being a fixedfactor applied to the sine wave lookup table values before loading intoa PWM duty cycle control register.
 24. The brushless motor controlsystem for providing a wide range of smooth and precisely controlledspeeds for pan-tilt-zoom surveillance cameras of claim 1, in which atultra-low speeds, the brushless motor is driven synchronously in lowspeed mode using a timer interrupt to advance the lookup tableappropriate duty cycle to drive each phase of PWM output to thebrushless motor.
 25. The brushless motor control system for providing awide range of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras of claim 1, in which in order to run at speedsbelow 200 rpm, the brushless motor can be operated open loop in astepper mode, by which commutation is switched from one step to a nextstep under a timer interrupt and the Hall sensors are ignored.
 26. Thebrushless motor control system for providing a wide range of smooth andprecisely controlled speeds for pan-tilt-zoom surveillance cameras ofclaim 1, in which the low speed mode uses synchronous drive consistingof three PWMs, sine wave modulated.
 27. The brushless motor controlsystem for providing a wide range of smooth and precisely controlledspeeds for pan-tilt-zoom surveillance cameras of claim 1, in which thetransition phase uses H-Bridge PWM drivers, a fixed PWM outputfrequency, and a phase alignment that is center locked.
 28. Thebrushless motor control system for providing a wide range of smooth andprecisely controlled speeds for pan-tilt-zoom surveillance cameras ofclaim 1, in which in the transition phase is from the low speed mode tothe high speed mode, the programmable controller pre-loads default errorvalues into a PID regulation loop in order to achieve a smoothtransition, PWM output goes from sine wave to modulated square waveduring a transition speed range and then to unmodulated square wave inthe high speed mode.
 29. The brushless motor control system forproviding a wide range of smooth and precisely controlled speeds forpan-tilt-zoom surveillance cameras of claim 1, in which a transitionfrom the high speed mode to the low speed mode is made possible bysupplying a set of preset values similar to a sine wave lookup tableinstead of using a timer interrupt to synchronize the brushless motordriving, a current Hall sensor position from the high speed mode is usedto start a sine wave pattern at a nearest point in its cycle so that thepattern is synchronized to rotation of the brushless motor.
 30. Thebrushless motor control system for providing a wide range of smooth andprecisely controlled speeds for pan-tilt-zoom surveillance cameras ofclaim 1, in which while in the low speed mode, drive slip can bedetected by monitoring Hall position sensors relative to a sine wave anda baseline torque input is added to a duty cycle.
 31. The brushlessmotor control system for providing a wide range of smooth and preciselycontrolled speeds for pan-tilt-zoom surveillance cameras of claim 1, inwhich interrupts from Hall sensors trigger routines that take speedmeasurements by a reading timer which are stored in an array so that arunning average can be taken, the position of a rotor of the brushlessmotor is also read from the Hall sensors and a next commutation step isfound and sent to a motor drive chip at the same time as a current dutycycle value is read and loaded in a power stage controller (PSC) whichgenerates PWM drive output to windings in the brushless motor.
 32. Thebrushless motor control system for providing a wide range of smooth andprecisely controlled speeds for pan-tilt-zoom surveillance cameras ofclaim 32, in which asynchronously with the position of the rotor beingread, a main software loop runs and reads commands in from a TTL serialbus port, which are decoded and processed by the programmablecontroller.
 33. The brushless motor control system for providing a widerange of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras of claim 1, in which if a speed regulation of thebrushless motor is due, a new speed is calculated by taking aproportional and integral error between a required speed and a measuredspeed, from which a new value for a PWM duty cycle is then calculated.34. The brushless motor control system for providing a wide range ofsmooth and precisely controlled speeds for pan-tilt-zoom surveillancecameras of claim 33, in which a regulation loop is interrupt driven toensure that it occurs regularly.
 35. The brushless motor control systemfor providing a wide range of smooth and precisely controlled speeds forpan-tilt-zoom surveillance cameras of claim 1, in which resolution for asurveillance camera is quadrupled by storing a quarter of sine wavesused in a control process.
 36. The brushless motor control system forproviding a wide range of smooth and precisely controlled speeds forpan-tilt-zoom surveillance cameras of claim 2, in which a) appropriatehigh speed control is achieved by a motor driver card that receives Hallsensor outputs from the brushless motor and provides appropriate PWMoutput to drive the brushless motor at a selected speed; b) the highspeed mode employs trapezoidal Hall Effect feedback looping withprogrammable controller Proportional, Integrated, Differential (PID)error correction; c) a camera control card issues Video System ControlArchitecture formatted commands on a TTL serial bus to a Pan motordriver card or to a Tilt motor driver cards or to a camera; d) motordriver cards can command a motor to go to a specific position, reportthe current position by means of a digital resolver, drive at a specificspeed and direction, and stop; e) motor driver cards can command a motorto send back data, such as current motor speed and PWM levels and canset motor operational parameters; f) the operation parameters includeone or more of closed loop gains, acceleration rates, and brake force;g) an auxiliary control card can allow for three independent integratedcircuit bus protocol ports so that pan, tilt and zoom positions can befed to it from each position, thereby enabling external dedicated securecontrol pathways for panning, tilting and zooming; h) a motor drivercard used to regulate the speed of pan/tilt/zoom (PTZ) motors asdirected from an external source such as a camera control card or anauxiliary control card; i) the brushless motor comprises a series ofstationary wire-wound stators affixed around a central rotatingmultipolar magnet rotor that generates rotary motion to move asurveillance camera around each axis when provided with an appropriatelytimed PWM output through the stators; j) Hall Sensors are positionedaround the brushless motor to detect polarity changes as it rotates, andto provide speed regulation feedback signals to a programmablecontroller by means of a sensor output pathway; k) the programmablecontroller generates control signals for a PWM driver chip whichsupplies PWM output for the brushless motor; l) a resolver driver chipdetects and processes motor positions for each axis and forwards angularpositional data to a programmable controller chip; m) a sinusoidalwaveform oscillator generates sine waves for smooth motor speed in thelow speed mode; n) in the low speed mode a sine wave is sent to eachstator in the brushless motor, and each succeeding stator receives asine input which is a number of degrees advanced from that sent to aprevious stator; o) in the high speed mode, the brushless motor isdriven by each channel of a PWM output, which is regulated by a feedbackloop from a Hall sensor output; p) in the transition phase from the lowspeed mode to the high speed mode, the modulation of the PWM squarewaves with sine waves is done by: i) having a center locked phasealignment between each wavelength, and by using a fixed frequencybetween wavelengths; ii) each sine wave adds to or subtracts from astandard PWM output and creates a modulated PWM waveform. q) sinecommutation drives the brushless motor by means of sine wave input tostators, the sine wave being incrementally out of phase to eachsuccessive stator in increments that are 360 degrees divided by thenumber stators, whereby a rotor is attracted to each stator 14 in turnas the sine wave input at a first stator increases to its maximumvoltage, and then to a second stator as its voltage increases while thefirst stator's voltage decreases; r) the low speed mode operates whenthe brushless motor has an rpm number less than a presselected number inthe range of 200-300 rpm, the high speed mode operates when thebrushless mote has an rpm number greater than a preselected number inthe range of 200-300 rpm; and the transition phase occurs at atransition speed in the range of 200-300 rpm, in order to effect smoothoperation of the brushless motor speeds above and below the transitionspeed; s) the high speed mode uses closed loop feedback which sends Hallsensor outputs to the programmable controller which determines if aspeed of the brushless motor is high enough and then regulates thatspeed by means of PID looping; t) a result of PID looping determines aduty cycle of a square wave sent to a power stage controller whichsupplies a PWM driver, the driver sends a phased output to drive eachstator of the brushless motor, the PID looping varies the duty cycleaccording to proportional, integrated, and differential speed error,commutation is controlled by switching through a commutation patternevery time Hall sensors change polarity, and three PWMs run a commonduty cycle, but only one PWM output is enabled at a time; u) the lowspeed mode varies a PWM duty cycle according to preset values held in asine wave lookup table, position in the lookup table is sequential andis switched by a timer interrupt to control speed of the brushlessmotor, each stator thereof having its own PWM output source, each sourcebeing a set number of degrees apart in the sine table, the PWM dutycycle being continuously varied in a sine wave pattern, and torque beinga fixed factor applied to the sine wave lookup table values beforeloading into a PWM duty cycle control register; v) the low speed modeuses synchronous drive consisting of three PWMs, sine wave modulated; w)the transition phase uses H-Bridge PWM drivers, a fixed PWM outputfrequency, and a phase alignment that is center locked; x) if a speedregulation of the brushless motor is due, a new speed is calculated bytaking a proportional and integral error between a required speed and ameasured speed, from which a new value for a PWM duty cycle is thencalculated, and a regulation loop is interrupt driven to ensure that itoccurs regularly;
 37. A brushless motor control system for providing awide range of smooth and precisely controlled speeds for pan-tilt-zoomsurveillance cameras, in which a seamless combination of high and lowspeed commutation modes is provided for a brushless motor by preloadingPID and lookup table registers used by a programmable controller for asmooth transition from high speed mode to low speed mode, and from lowspeed mode to high speed mode, and phase locking a sine position duringtransitions, in order to give a surveillance camera an ability toquickly move from one target to another at up to 100 degrees per secondyet track objects that are moving very slowly.